import 'package:flutter/material.dart';
import 'font_size.dart';

class AppTextTheme {
  const AppTextTheme._({
    required this.h10,
    required this.h12,
    required this.h14,
    required this.h16,
    required this.h20,
    required this.h24,
    required this.h32,
    required this.h40,
    required this.h15,
    required this.h18,
    required this.h13,
    required this.appBarTitle,
  });

  factory AppTextTheme() {
    const normalRegular = TextStyle(
      fontWeight: FontWeight.w500,
      leadingDistribution: TextLeadingDistribution.even,
    );
    return AppTextTheme._(
        h10: const TextStyle(fontSize: FontSize.pt10).merge(normalRegular),
        h12: const TextStyle(fontSize: FontSize.pt12).merge(normalRegular),
        h14: const TextStyle(fontSize: FontSize.pt14).merge(normalRegular),
        h15: const TextStyle(fontSize: FontSize.pt15).merge(normalRegular),
        h16: const TextStyle(fontSize: FontSize.pt16).merge(normalRegular),
        h18: const TextStyle(fontSize: FontSize.pt18).merge(normalRegular),
        h20: const TextStyle(fontSize: FontSize.pt20).merge(normalRegular),
        h24: const TextStyle(fontSize: FontSize.pt24).merge(normalRegular),
        h32: const TextStyle(fontSize: FontSize.pt32).merge(normalRegular),
        h40: const TextStyle(fontSize: FontSize.pt40).merge(normalRegular),
        h13: const TextStyle(fontSize: FontSize.pt13).merge(normalRegular),
        appBarTitle: const TextStyle(fontSize:FontSize.pt17).bold().copyWith(color: Colors.black)

    );
  }

  /// pt10
  final TextStyle h10;

  /// pt12
  final TextStyle h12;

  /// pt14
  final TextStyle h14;

  /// pt16
  final TextStyle h16;

  /// pt18
  final TextStyle h18;

  final TextStyle appBarTitle;

  final TextStyle h15;

  /// pt20
  final TextStyle h20;

  /// pt24
  final TextStyle h24;

  /// pt32
  final TextStyle h32;

  /// pt40
  final TextStyle h40;

  final TextStyle h13;
}

extension TextStyleExt on TextStyle {
  TextStyle bold() => copyWith(fontWeight: FontWeight.w700);

  TextStyle comfort() => copyWith(height: 1.8);

  TextStyle dense() => copyWith(height: 1.2);

}